<div id="cdiscussions">
<div class="grid_9">
<h3>Discussions</h3>
<ul>
<?php foreach($query->result() as $row) { ?>
 
	<li><div class="header"><h4><?=anchor('discussions/single/' . $row->did, $row->title)?> </h4><p>Started by <?=$row->fname?> on <?php 
echo mdate("%M %d", $row->tdate);
echo ' with <strong>' . $row->count ?></strong> replies</p>
</div>
	<div class="body">
	<?=$row->topic?>
	</div>
	</li>
<?php } ?>
</ul>
</div>
<div class="grid_7">
<h3>Start A New Discussion</h3>
<?=form_open('discussions/do_newdiscussion');?>
<?=form_hidden('user', $this->users->getInfo($this->users->user,'id'));?>
<ul>
<li><label>Title</label><input type="text" name="title" /></li>
<li><label>Post</label><textarea name="topic"></textarea></li>
<li><input type="submit" class="submit" value="Start new discussion" /></li>
</form>
</div>
</div>